# -*- coding: utf-8 -*-
import scrapy


class AddstockSpider(scrapy.Spider):
    name = 'AddStockSpider'
    allowed_domains = ['http://data.eastmoney.com/other/gkzf.html']
    start_urls = ['http://data.eastmoney.com/other/gkzf.html/']

    #
    # def parse(self, response):
    #     pass
    def parse(self, response):
        scrapy.shell.inspect_response
        print("body：====>" + response.text)
        # log = logging.getLogger(self.name)
        table = response.xpath('//table').extract()
        print("table 数量：====>" + len(table))
        print("1====>" + table[0])
        # ss = s.encode('raw_unicode_escape')
        #     print(ss)  # 结果：b'\xe9\x9d\x92\xe8\x9b\x99\xe7\x8e\x8b\xe5\xad\x90'
        #     sss = ss.decode()
        #     print(sss)
        # log.warning("====>"+table[0].decode(),level=Warning)
        # for item in table:
        #     if

        print("====>" + table[0].decode())

